
import java.util.Scanner;

public class OJzichuang {
    public static void main(String[] args) {
        long a,b;
        Scanner sc=new Scanner(System.in);
        while (sc.hasNextLong()){
            long d=0;
            a=sc.nextLong();
            b=sc.nextLong();
            if (a<b){
                d= (b - a) +1;
                if(a<0){
                    System.out.println(((b+a)*d)/2);
                }else {
                    System.out.println(((a+b)*d)/2);
                }
            }
        }
    }
}